<template>
<div class="result">
     <div class="success" v-if="auditResult===1">
        <div class="successPic">
            <img src="../../assets/icon/submit.png" alt="">
        </div>
        <div class="middle">
            <h1>审核通过</h1>
        </div>
        
        <!-- <div class="btn">
            <button @click="backHome">返回首页</button>
            <button @click="checkDetail">查看详情</button>
        </div> -->
    </div>
    <div class="success" v-if="auditResult===0">
        <div class="successPic">
            <img src="../../assets/icon/loading.png" alt="">
        </div>
        <div class="progress">
            <p>待审核,请耐心等待</p>
        </div>
        
        <!-- <div class="btn">
            <button @click="backHome">返回首页</button>
            <button @click="checkDetail">查看详情</button>
        </div> -->
    </div>
    <div class="success" v-if="auditResult===2">
        <div class="failedPic">
            <img src="../../assets/icon/failed.png" alt="">
        </div>
        <div class="failed">
            <p>审核不通过</p>
        </div>
        
        <div class="btn">
            <button @click="backHome">返回首页</button>
            <button @click="reapply">重新申请</button>
        </div>
    </div>
</div>
   
</template>
<script>
 export default{
    mounted(){
        if(this.$route.params.state==undefined||this.$route.params.state==null){
            this.auditResult=this.$route.params.submitState
        }else{
             this.auditResult=this.$route.params.state
        }
        
    },
    data(){
        return{
            auditResult:'',
        }
    },
    methods:{
        backHome(){
            this.$router.push("/agricultural-class")
        },
        checkDetail(){
            this.$router.push({name:"ExpertsIn",params:{flag:false}})
        },
        reapply(){
            this.$router.replace({name:"ExpertsIn",params:{flag:true,action:'edit'}})
        }
    }
 }
</script>
<style>
.result{
    width: 100%;
    height: 100%;
   
}
.successPic{
   width: 45%;
   height: 20%;
   margin: auto;
   margin-top: 0%;
   /* padding-top: 20%; */
}
.successPic img{
    width: 60%;
    height: 81%;
    margin: auto;
    display: block;
}
.success h1{
    width: 100%;
    text-align: center;
}
.success p{
    width: 100%;
    text-align: center;
    color: #9e9e9f;
}
.success{
    height:100% ;
    padding-top: 40%;
}
.btn{
    width: 100%;
    height: 20%;
    margin-top: 36%;
}
.btn button{
    width: 30%;
    height: 26%;
    background-color: #8bbf7e;
    margin: 0 9% ;
    border-radius: 2%;
    color: white;
    border: solid 1px #8bbf7e;
}
.failed{
    margin-top: 15%;
    font-size: 20px;
}
.failedPic img{
    width: 34%;
    height: 64%;
    margin: auto;
    display: block;
}
.progress{
     margin-top: 15%;
    font-size: 20px;
}
</style>